﻿#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QMenuBar>
#include <QMenu>
#include <QAction>
#include <QLabel>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    _pwidget = new MyWidget(this);
    setCentralWidget(_pwidget);

    QMenuBar *mBar = menuBar();
    QMenu *pFile = mBar->addMenu(tr("文件"));

    QAction *pExit = pFile->addAction("退出");
    connect(pExit,&QAction::triggered,this,&MainWindow::close);

    QLabel *msgLabel = new QLabel;

    this->setFixedSize(1280,960);

    msgLabel->setText("就绪");
    statusBar()->addWidget(msgLabel);
}

MainWindow::~MainWindow()
{
    delete ui;
}

